package Eyjafjalla.relic;

import Eyjafjalla.action.GainCloudEnergyAction;
import Eyjafjalla.helper.StringHelper;
import basemod.abstracts.CustomRelic;
import com.megacrit.cardcrawl.actions.common.RelicAboveCreatureAction;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.helpers.ImageMaster;
import com.megacrit.cardcrawl.relics.AbstractRelic;

public class DreamModel extends CustomRelic {

    public static final String ID = "eyjafjalla:DreamModel";

    public DreamModel(){
        super(ID, ImageMaster.loadImage(StringHelper.getRelicIMGPATH(ID,false)),ImageMaster.loadImage(StringHelper.getRelicIMGPATH(ID,true)),RelicTier.COMMON,LandingSound.SOLID);
        this.energyBased = true;
    }

    private boolean firstTurn = true;

    public void atTurnStart() {
        if (this.firstTurn) {
            this.flash();
            this.addToTop(new GainCloudEnergyAction(1));
            this.addToTop(new RelicAboveCreatureAction(AbstractDungeon.player, this));
            this.firstTurn = false;
        }

    }

    public void atPreBattle() {
        this.firstTurn = true;
    }

    @Override
    public String getUpdatedDescription() {
        return DESCRIPTIONS[0];
    }

    @Override
    public AbstractRelic makeCopy() {
        return new DreamModel();
    }
}


